<%@page import="service.implement.ProjectDAO"%>
<%@page import="model.Project"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<%@ include file="Menu.jsp"%>
	<form action="doProject" method="post" id="delete">

		<div class="panel panel-default">
			<!-- Default panel contents -->
			<div class="panel-heading">List Project</div>
			<!-- Table -->
			<table class="table">
				<thead>
					<tr>
						<th>Id</th>
						<th>NameProject</th>
						<th>StartDate</th>
						<th>EndDate</th>
					</tr>
				</thead>
				<tbody>
					<%
						ArrayList<Project> list = new ProjectDAO().getProject();
						try {
							int i = 0;
							for (Project p : list) {
					%>
					<tr>
						<td><%=p.getId()%></td>
						<td><%=p.getNameProject()%></td>
						<td><%=p.getStartDate()%></td>
						<td><%=p.getEndDate()%></td>
						<td><a href="doProject?checkProject=<%=p.getId()%>">Edit</a></td>
						<td><input type="checkbox" id="checkProject<%=i%>"
							name="checkProject<%=i%>" value="<%=p.getId()%>" /></td>
					</tr>
					<%
						i++;
							}
						} catch (Exception e) {
							e.printStackTrace();
						}
					%>
					<input type="hidden" name="size" value="<%=list.size()%>" />
				</tbody>
			</table>
		</div>
		<input type="submit" name="do" class="submit1" value="Delete Project"
			onclick="return confirm('Ban that su muon xoa ?');" />
	</form>

</body>
</html>